/**
 * 我的帐户布局
 */
import './index.scss';
import { uasrAside } from '../../utils/const';
import Layout from '../Home/index';

export default (props) => {
    const { children } = props;

    // /**
    //  * 添加选中色
    //  */
    // const checked = async (id) => {
    //     console.log(id);
    //     try {

    //     } catch (error) { }
    // }
    return (
        <Layout>
            <div className="warpper">
                {/* 侧边栏 */}
                <aside>
                    {
                        uasrAside.map(item => <div className='user_manage' key={item.id}>
                            <h4>{item.name}</h4>
                            {item.children.map(n => <div className="links" key={n.id}>
                                <a href={n.id === 1 ? '/member' : n.id === 11 ? '#/member/order' : '#/'}>{n.name}</a>
                            </div>)}
                        </div>)
                    }
                </aside>
                {/* 内容 */}
                <div className="article">
                    {children}
                </div>
            </div>
        </Layout>
    )
}